{% extends "base.html" %}

{% block title %}
    新闻管理
{% endblock %}

{% block head %}
    <h1 class="page-header">
        新闻管理<a class="btn btn-default pull-right" href="/add_news">添加</a>
    </h1>
{% endblock %}

{% block content %}
    <div class="col-lg-12">
        <div class="row">
            <table class="table">
                <thead>
                <tr>
                <tr>
                    <th>标题</th>
                    <th>作者</th>
                    <th>时间</th>
                    <th>操作</th>
                </tr>
                </tr>
                </thead>
                <tbody>
                {% for n in new_list %}
                <tr>
                    <td class="col-lg-3">{{ n.n_name }}</td>
                    <td class="col-lg-3">{{ n.n_author }}</td>
                    <td class="col-lg-3">{{ n.n_date }}</td>
                    <td class="col-lg-3">
                        <a class="btn btn-default" href="/detail_news/{{ n.id }}">详情</a>
                        <a class="btn btn-default" href="/edit_news/{{ n.id }}">编辑</a>
                        <a class="btn btn-default" href="/del_news/{{ n.id }}">删除</a>
                    </td>
                </tr>
                {% endfor %}
                </tbody>
            </table>
        </div>
    </div>
{% endblock %}